import service from '@/utils/request';

export interface ListParams {
  postCode: string;
  postName: string;
  status: string;
}
// 查询公告列表
export const getListData = (params: ListParams) => {
  return service.request({
    url: '/system/post/list',
    method: 'get',
    params,
  });
};

// 查询岗位详细
export const getPost = (postId: any) => {
  return service.request({
    url: `/system/post/${postId}`,
    method: 'get',
  });
};

// 新增岗位
export const addPost = (data: any) => {
  return service.request({
    url: '/system/post',
    method: 'post',
    data,
  });
};

// 修改岗位
export const updatePost = (data: any) => {
  return service.request({
    url: '/system/post',
    method: 'put',
    data,
  });
};

// 删除岗位
export const delPost = (postId: any) => {
  return service.request({
    url: `/system/post/${postId}`,
    method: 'delete',
  });
};
